package router

import (
	"github.com/gin-gonic/gin"
	"mxshop-api/order-web/api/order"
	middlewares "mxshop-api/order-web/middleware"
)

func InitOrderRouter(Router *gin.RouterGroup) {
	OrderRouter := Router.Group("orders").Use(middlewares.JWTAuth())
	{
		OrderRouter.GET("", middlewares.IsAdminAuth(), order.List) //訂單列表
		OrderRouter.POST("", order.New)                            //新建訂單
		OrderRouter.GET("/:id/", order.Detail)                     //訂單詳情

	}
}
